package com.cloudptt.api.product.func.call;

public class CallConst
{
	public static final int Operate_Suc                          = 0;

	public static final int CallId_Default                      = 0;

	public static final int CallState_Begin                     = 0;
	public static final int CallState_InitState                 = CallState_Begin + 1;
	public static final int CallState_WattingState           	= CallState_Begin + 2;
	public static final int CallState_ConnectingState           = CallState_Begin + 3;
	public static final int CallState_Activite                  = CallState_Begin + 4;
	public static final int CallState_DisconnectingState        = CallState_Begin + 5;


	public final static int CallMediaState_None = 0;
	public final static int CallMediaState_Active = CallMediaState_None + 1;
	public final static int CallMediaState_LocalHold = CallMediaState_Active + 1;
	public final static int CallMediaState_RemoteHold = CallMediaState_LocalHold + 1;
	public final static int CallMediaState_Error = CallMediaState_RemoteHold + 1;

	public static final int FloorState_Begin                    = 10;
	public static final int FloorState_Null                     = FloorState_Begin + 1;
	public static final int FloorState_NoPermission             = FloorState_Begin + 2;
	public static final int FloorState_PendingRequset           = FloorState_Begin + 3;
	public static final int FloorState_Permission               = FloorState_Begin + 4;
	public static final int FloorState_PendingRelease 			= FloorState_Begin + 5;


	public static final int VideoTransState_Begin = 20;
	public static final int VideoTransState_NoPermission = VideoTransState_Begin + 1;
	public static final int VideoTransState_PendingRequest = VideoTransState_Begin + 2;
	//	public static final int VideoState_Show                     = VideoState_Begin + 3;
	public static final int VideoTransState_PendingRelease = VideoTransState_Begin + 4;
	public static final int VideoTransState_Permission = VideoTransState_Begin + 5;

	public static final int VideoRecvState_Begin = 30;
	public static final int VideoRecvState_NoPermission = VideoRecvState_Begin + 1;
	public static final int VideoRecvState_PendingRequest = VideoRecvState_Begin + 2;
	public static final int VideoRecvState_PendingRelease = VideoRecvState_Begin + 4;
	public static final int VideoRecvState_Permission = VideoRecvState_Begin + 5;

//	public static final int VideoState_Begin                    = 20;
//	public static final int VideoState_NoPermission             = VideoState_Begin + 1;
//	public static final int VideoState_PendingRequest           = VideoState_Begin + 2;
//	//	public static final int VideoState_Show                     = VideoState_Begin + 3;
//	public static final int VideoState_PendingRelease           = VideoState_Begin + 4;
//	public static final int VideoState_Permission               = VideoState_Begin + 5;

	public static final int BtnId_Begin                         = 50;
//	public static final int BtnId_Talk_Down                     = BtnId_Begin + 1;
//	public static final int BtnId_Talk_Up                       = BtnId_Begin + 2;
//	public static final int BtnId_Exit                          = BtnId_Begin + 3;

	public static final int ErrId_Begin                         = 80;
	public static final int ErrId_DestoryCall                 = BtnId_Begin + 1;
	//	public static final int ErrId_TimeOut                       = BtnId_Begin + 2;
	public static final int ErrId_SetHold                       = BtnId_Begin + 3;

	public static final int BtnAction_Begin                     = 100;
	//	public static final int BtnAction_Down                      = BtnAction_Begin + 1;
//	public static final int BtnAction_Up                        = BtnAction_Begin + 2;
	public static final int BtnAction_Make                      = BtnAction_Begin + 0;
	public static final int BtnAction_Make_Video                = BtnAction_Begin + 1;
	public static final int BtnAction_Hangup                    = BtnAction_Begin + 2;
	public static final int BtnAction_Answer					= BtnAction_Begin + 3;
	public static final int BtnAction_Exit                      = BtnAction_Begin + 5;
	public static final int BtnAction_Request                   = BtnAction_Begin + 6;
	public static final int BtnAction_Release                   = BtnAction_Begin + 7;
	public static final int BtnAction_SwitchCamera              = BtnAction_Begin + 8;
	public static final int BtnAction_MicMute                   = BtnAction_Begin + 9;
	public static final int BtnAction_StartVideoSource          = BtnAction_Begin + 10;
	public static final int BtnAction_StopVideoSource           = BtnAction_Begin + 11;
	public static final int BtnAction_Minimize                  = BtnAction_Begin + 12;
	public static final int BtnAction_PlayWavFile               = BtnAction_Begin + 13;
	public static final int BtnAction_Subscribe                 = BtnAction_Begin + 14;
	public static final int BtnAction_Vol_Up                    = BtnAction_Begin + 15;
	public static final int BtnAction_Vol_Down                  = BtnAction_Begin + 16;
	public static final int BtnAction_Trans_Begin               = BtnAction_Begin + 17;
	public static final int BtnAction_Trans_End                 = BtnAction_Begin + 18;
	public static final int BtnAction_Recv_Begin                = BtnAction_Begin + 19;
	public static final int BtnAction_Recv_End                  = BtnAction_Begin + 20;
	public static final int BtnAction_Ring                  	= BtnAction_Begin + 21;
	public static final int BtnAction_Accept                  	= BtnAction_Begin + 22;
	public static final int BtnAction_Reject                  	= BtnAction_Begin + 23;
	public static final int BtnAction_VideoAdd                	= BtnAction_Begin + 24;
	public static final int BtnAction_VideoRemove               = BtnAction_Begin + 25;

//	public static final int SysAction_NetworkOfflin             = BtnAction_Begin + 4;

	public static final int Session_Begin                    = 200;
	//	public static final int CallState_Connecting_Calling       = CallState_Begin + 1;//主叫连接成功
	public static final int Session_Connecting        = Session_Begin + 2;//被叫连接成功
	public static final int Session_Disconnected             = Session_Begin + 3;
	public static final int Session_Confirmed_Active         = Session_Begin + 4;
	public static final int Session_Confirmed_Hold           = Session_Begin + 5;
	public static final int Session_Confirmed_LateJoinNoFloor= Session_Begin + 6;
	public static final int Session_MediaErr               = Session_Begin + 7;
//	ublic static final int Session_Confirmed_Active         = Session_Begin + 8;
//	public static final int Session_Confirmed_Active_Floor         = Session_Begin + 8;
//	public static final int Session_Confirmed_Active_Video         = Session_Begin + 9;

//	public static final int CallState_Calling                  = CallState_Begin + 7;//来电

	public static final int Info_Begin                         = 300;
	public static final int Info_Listen                		   = Info_Begin + 1;
	public static final int Info_Speaking                      = Info_Begin + 2;
	public static final int Info_TalkEnd                       = Info_Begin + 3;
	public static final int Info_Show_Start                	   = Info_Begin + 4;
	public static final int Info_Show_Stop                     = Info_Begin + 5;
	public static final int Info_Err                           = Info_Begin + 6;

	//	public static final int Timer_Idle = 35;//话权空闲释放定时器
//	public static final int Timer_Talk = 35;//话权占用释放定时器
//	public static final int Timer_Listen = 35;//话权停释放定时器
	public static final int Timer_Long = 10;
	//	public static final int Timer_Short = 5;
	public static final int Timer_None = 0;

	public static final int Timer_Video_Show = 24*60*60;

	public final static String Speak_Log = "speak";

	public static final int SurfaceView_Type_Local = 1;
	public static final int SurfaceView_Type_Remote = 2;




	public static String userActionTag(int action){
		String tag="unknown " + action;
		switch (action) {
			case BtnAction_Make:
				tag = "BtnAction_Make";
				break;
			case BtnAction_Make_Video:
				tag = "BtnAction_Make_Video";
				break;
			case BtnAction_Hangup:
				tag = "BtnAction_Hangup";
				break;
			case BtnAction_Answer:
				tag = "BtnAction_Answer";
				break;
			case BtnAction_Exit:
				tag = "BtnAction_Exit";
				break;
			case BtnAction_Request:
				tag = "BtnAction_Request";
				break;
			case BtnAction_Release:
				tag = "BtnAction_Release";
				break;
			case BtnAction_SwitchCamera:
				tag = "BtnAction_SwitchCamera";
				break;
			case BtnAction_MicMute:
				tag = "BtnAction_MicMute";
				break;
			case BtnAction_StartVideoSource:
				tag = "BtnAction_StartVideoSource";
				break;
			case BtnAction_StopVideoSource:
				tag = "BtnAction_StopVideoSource";
				break;
			case BtnAction_Trans_Begin:
				tag = "BtnAction_Trans_Begin";
				break;
			case BtnAction_Trans_End:
				tag = "BtnAction_Trans_End";
				break;
			case BtnAction_Recv_Begin:
				tag = "BtnAction_Recv_Begin";
				break;
			case BtnAction_Recv_End:
				tag = "BtnAction_Recv_End";
				break;
			case BtnAction_Accept:
				tag = "BtnAction_Accept";
				break;
			case BtnAction_Reject:
				tag = "BtnAction_Reject";
				break;
			case BtnAction_VideoAdd:
				tag = "BtnAction_VideoAdd";
				break;
			case BtnAction_VideoRemove:
				tag = "BtnAction_VideoRemove";
				break;
			default:
				break;
		}
		return tag;
	}

	public static String sessionTag(int action){
		String tag="unknown";
		switch (action)
		{
			case Session_Connecting:
				tag = "Session_Connecting";
				break;
			case Session_Disconnected:
				tag = "Session_Disconnected";
				break;
			case Session_Confirmed_Active:
				tag = "Session_Confirmed_Active";
				break;
			case Session_MediaErr:
				tag = "Session_MediaErr";
				break;
			default:
				break;
		}
		return tag;
	}
	public static String infoTag(int type) {
		String tag="unknown";
		switch (type)
		{
			case Info_Listen:
				tag = "Info_Listen";
				break;
			case Info_Speaking:
				tag = "Info_Speaking";
				break;
			case Info_TalkEnd:
				tag = "Info_TalkEnd/";
				break;
			case Info_Show_Start:
				tag = "Info_Show_Start";
				break;
			case Info_Show_Stop:
				tag = "Info_Show_Stop";
				break;
			case Info_Err:
				tag = "Info_Err";
				break;
			default:
				break;
		}
		return tag;
	}

	public static String stateTag(int type) {
		String tag="unknown";
		switch (type)
		{
			case CallState_Begin:
				tag = "CallState_Begin";
				break;
			case CallState_InitState:
				tag = "CallState_InitState";
				break;
			case CallState_WattingState:
				tag = "CallState_WattingState";
				break;
			case CallState_ConnectingState:
				tag = "CallState_ConnectingState";
				break;
			case CallState_Activite:
				tag = "CallState_Activite";
				break;
			case CallState_DisconnectingState:
				tag = "CallState_DisconnectingState";
				break;
			case FloorState_Begin:
				tag = "SpeakState_Begin";
				break;
			case FloorState_NoPermission:
				tag = "FloorNoPermissionState";
				break;
			case FloorState_PendingRequset:
				tag = "FloorPendingRequestState";
				break;
			case FloorState_Permission:
				tag = "FloorPermissionState";
				break;
			case FloorState_PendingRelease:
				tag = "FloorPendingReleaseState";
				break;

			case VideoTransState_Begin:
				tag = "VideoState_Begin";
				break;
			case VideoTransState_NoPermission:
				tag = "VideoTransState_NoPermission";
				break;
			case VideoTransState_PendingRequest:
				tag = "VideoTransState_PendingRequest";
				break;
			case VideoTransState_PendingRelease:
				tag = "VideoTransState_PendingRelease";
				break;
			case VideoTransState_Permission:
				tag = "VideoTransState_Permission";
				break;

			case VideoRecvState_Begin:
				tag = "VideoRecvState_Begin";
				break;
			case VideoRecvState_NoPermission:
				tag = "VideoRecvState_NoPermission";
				break;
			case VideoRecvState_PendingRequest:
				tag = "VideoRecvState_PendingRequest";
				break;
			case VideoRecvState_PendingRelease:
				tag = "VideoRecvState_PendingRelease";
				break;
			case VideoRecvState_Permission:
				tag = "VideoRecvState_Permission";
				break;
			default:
				break;
		}
		return tag;
	}
}
